package com.ruoyi.system.service.impl;

import java.util.List;
import cn.hutool.core.util.ObjectUtil;
import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ADictShopsMapper;
import com.ruoyi.system.domain.ADictShops;
import com.ruoyi.system.service.IADictShopsService;

/**
 * 字典商铺字段Service业务层处理
 *
 * @author gf
 * @date 2024-11-23
 */
@Service
public class ADictShopsServiceImpl implements IADictShopsService {
    @Autowired
    private ADictShopsMapper aDictShopsMapper;

    /**
     * 查询字典商铺字段
     *
     * @param id 字典商铺字段主键
     * @return 字典商铺字段
     */
    @Override
    public ADictShops selectADictShopsById(Long id) {
        return aDictShopsMapper.selectADictShopsById(id);
    }

    /**
     * 查询字典商铺字段列表
     *
     * @param aDictShops 字典商铺字段
     * @return 字典商铺字段
     */
    @Override
    public List<ADictShops> selectADictShopsList(ADictShops aDictShops) {
        return aDictShopsMapper.selectADictShopsList(aDictShops);
    }

    /**
     * 新增字典商铺字段
     *
     * @param aDictShops 字典商铺字段
     * @return 结果
     */
    @Override
    public int insertADictShops(ADictShops aDictShops) {
        aDictShops.setCreateTime(DateUtils.getNowDate());
        return aDictShopsMapper.insertADictShops(aDictShops);
    }

    /**
     * 修改字典商铺字段
     *
     * @param aDictShops 字典商铺字段
     * @return 结果
     */
    @Override
    public int updateADictShops(ADictShops aDictShops) {
        aDictShops.setUpdateTime(DateUtils.getNowDate());
    return aDictShopsMapper.updateADictShops(aDictShops);
    }

    /**
     * 批量删除字典商铺字段
     *
     * @param ids 需要删除的字典商铺字段主键
     * @return 结果
     */
    @Override
    public int deleteADictShopsByIds(Long[] ids) {
        return aDictShopsMapper.deleteADictShopsByIds(ids);
    }

    /**
     * 删除字典商铺字段信息
     *
     * @param id 字典商铺字段主键
     * @return 结果
     */
    @Override
    public int deleteADictShopsById(Long id) {
        return aDictShopsMapper.deleteADictShopsById(id);
    }

    /**
     * 批量逻辑删除字典商铺字段
     *
     * @param ids 需要删除的字典商铺字段主键
     * @return 结果
     */
    @Override
    public int logicDeleteADictShopsByIds(Long[] ids) {
        return aDictShopsMapper.logicDeleteADictShopsByIds(ids);
    }
    /**
     * 逻辑删除字典商铺字段信息
     *
     * @param id 字典商铺字段主键
     * @return 结果
     */
    @Override
    public int logicDeleteADictShopsById(Long id) {
        return aDictShopsMapper.logicDeleteADictShopsById(id);
    }

    @Override
    public List<ADictShops> selectADictShopsXcxList() {
        return aDictShopsMapper.selectADictShopsXcxList();
    }

    @Override
    public List<ADictShops> selectADictShopsXcxNickNameList() {
        return aDictShopsMapper.selectADictShopsXcxNickNameList();
    }

    @Override
    public List<ADictShops> selectADictShopsAllList() {
        return aDictShopsMapper.selectADictShopsXcxList();
    }

}
